#include "stdafx.h"
#include "SimpleList.h"
#include <iostream>


using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{

	SimpleList myList = *new SimpleList();
	

	myList.append(1);
	myList.append(2);
	myList.append(3);
	myList.append(4);  // will be poped
	myList.append(5);
	myList.append(6);
	myList.append(7);
	myList.append(8);
	myList.append(9);
	myList.append(10);
	myList.append(11);
	myList.append(12);

	myList.appendAfter(100, 6);
	

	myList.append(44);

	myList.appendAfter(1000, 8);

	cout << "\nPop <4> element: ";
	myList.pop(4);
	cout << "\n";

cout << "I'm printing all SimpleList :) \n";

	while (myList.hasNext() )
	{
		cout << "\n " << myList.getValue();
	}

	
	cout << "\n\n In the SimpleList there are " << myList.getLength() << " elements\n";
	cout << " <4> From beginning: " << myList.getValueByNumberOrderByBeginning(4) << "\n";
	cout << " <6> From end: " << myList.getValueByNumberOrderByEnd(6) << "\n";


	
	
	return 0;
}

